Network communication device and a packet routing method

ABSTRACT

A network communication device includes a transceiver module, an address translation module, a control buffer module, an IP routing module, and a processor. The transceiver module is configured for forwarding packets. The address translation module determines if addresses of the forwarded packets need to be translated and translates the addresses of the forwarded packets when needed. Next, the address translation module marks the packets of translated addresses with flags and records the flags in the control buffer module. The IP routing module sends the forwarded packets from the address translation module to the address translation module. The address translation module receives the forwarded packets from the IP routing module, determines if the addresses of the forwarded packets have been translated by querying the flags in the control buffer module, and sends the forwarded packets that have been translated to the transceiver module.

BACKGROUND

1. Field of the Invention

Embodiments of the present disclosure relate to network communicationdevices, and more particularly to a network communication device and amethod for routing packets with translated addresses.

2. Description of related art

A company may have an internal communication network allowing employeesto communicate internally with each other Alternatively, the internalcommunication network can be connected to the Internet for accessingmore information. When company computers are connected to the Internet,they are configured with internet protocol (IP) addresses. However,companies usually have a limited number of IP addresses. As a result, anIP sharing device is used to distribute the limited number of IPaddresses among employees, allowing numerous employees access to theInternet simultaneously. The IP sharing devices can translate virtual IPaddresses in compliance with the internal network into physical IPaddresses on the Internet.

One such IP sharing device translates addresses of internal packets viaan address translation module, sends the internal packets with thetranslated addresses to an IP routing module for routing, and sends theinternal packets with the translated address to an address translationmodule to be forwarded to the Internet. The internal packets are sent tothe address translation module twice before being sent to the externalnetwork, which is unnecessary time spent on forwarding packets, therebydecreasing the utilization efficiency of the IP address sharing devices.

SUMMARY

A network communication device for forwarding packets between aplurality of user terminal devices and a communication network includesa transceiver module, an address translation module, a control buffermodule, an internet protocol (IP) routing module, and a processor. Thetransceiver module is configured for forwarding the packets between theplurality of user terminal devices and the communication network. Theaddress translation module is configured for determining if addresses ofthe packets forwarded from the transceiver module need to be translated,translating the addresses of the packets forwarded from the transceivermodule upon the condition that the addresses of the packets forwardedfrom the transceiver module need to be translated, and marking thepackets of translated addresses with flags. The control buffer module isconfigured for recording the flags of the marked packets of translatedaddresses. The IP routing module is configured for routing the packetsforwarded from the transceiver module and sending the packets forwardedfrom the transceiver module to the address translation module. Theprocessor executes the transceiver module, the address translationmodule, the control buffer module, and the IP routing module. Theaddress translation module determines if the addresses of the packetsforwarded from the transceiver module from the IP routing module havebeen translated by querying the flags in the control buffer module whenreceiving the packets forwarded from the transceiver module from the IProuting module, and directly sends the marked packets from the IProuting module to the transceiver module.

Other advantages and novel features will become more apparent from thefollowing detailed description when taken in conjunction with theaccompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram of one embodiment of a networkcommunication device of the present disclosure.

FIG. 2 is a schematic diagram of one embodiment of the networkcommunication device processing packets.

FIG. 3 is a flowchart of one embodiment of a packet routing methodemployed by the network communication device of the present disclosure.

FIG. 4 is a flowchart of another embodiment of a packet routing methodof employed by the network communication device of the presentdisclosure.

DETAILED DESCRIPTION OF CERTAIN INVENTIVE EMBODIMENTS

As used herein, the term, “packet” is defined as a formatted piece ofdata used for communication between one or more devices across acommunication network. It may be understood that the packet can betransmitted and/or received as a series of bytes, characters, or bitsalone.

FIG. 1 is a schematic diagram of one embodiment of a networkcommunication device 20 of the present disclosure. In one embodiment,the network communication device 20 is connected to a plurality of userterminal devices 10 and a communication network 30, and is configuredfor forwarding packets between one or more of the user terminal devices10, the network communication device 20, and the communication network30. In one embodiment, the packets include internal packets, selfpackets, and forwarding packets. The internal packets indicate packetsforwarded between the user terminal devices 10. The self packetsindicate packets forwarded between the user terminal devices 10 and thenetwork communication device 20. The forwarding packets indicate packetsforwarded between the user terminal devices 10 and the communicationnetwork 30. In one embodiment, the self packets include packets sentfrom the user terminal devices 10 to configure the network communicationdevice 20 and response packets from the network communication device 20.In one embodiment, the network communication device 20 may be aninternet protocol (IP) sharing device with network address translationfunctionality, while the user terminal device 10 may be a computer, aserver, or a mobile device, such as a mobile phone or a personal digitalassistant (PDA).

The network communication device 20 includes a transceiver module 200,an address translation module 210, a connection table module 220, acontrol buffer module 230, an IP routing module 240, and an executingmodule 260. The transceiver module 200 may include a plurality ofphysical ports. The network communication device further includes atleast one specialized or general purpose processor, such as a processor21 for executing the transceiver module 200, the address translationmodule 210, the connection table module 220, the control buffer module230, the IP routing module 240, and the executing module 260.

The transceiver module 200 communicates with the user terminal devices10 and the communication network 30 so as to receive packets sent fromthe user terminal devices 10 and the communication network 30. Thetransceiver module 200 may then send the received packets to the addresstranslation module 210 (herein after referred as the forwarded packets).

The connection table module 220 is configured for recording data fromthe forwarded packets. In one embodiment, the data from the forwardedpackets includes, but is not limited to, source addresses, destinationaddresses, source ports, destination ports, translated addresses, andtranslated ports of the forwarded packets. In one embodiment, theconnection table module 220 records data from the forwarded packets in atable including several fields for source addresses, destinationaddresses, source ports, destination ports, translated addresses, andtranslated ports. It may be understood that sources addresses anddestination addresses of the forwarding packets are of differentformats, and source addresses and destination addresses of the selfpackets and the internal packets are respectively of the same formats.Therefore, the self packets and internal packets do not need to betranslated addresses and the translated addresses and translated portsfields of the received self packets and internal packets are null, andthe forwarding packets need to be translated addresses to transformformats of the source addresses and the destination addresses.

The address translation module 210 is connected to the transceivermodule 200, the connection table module 220, and the IP routing module240, and is configured for receiving the forwarded packets from thetransceiver module 200 and determining if addresses of the r forwardedpackets should be translated. In one embodiment, the address translationmodule 210 queries the source ports, the destination ports, and thetranslated ports in the connection table module 220 to determine if theaddresses of the forwarded packets should be translated. If there arematching source ports and destination ports in the connection tablemodule 220 with those from the forwarded packets, and the matchingsource ports and destination ports do not have corresponding translatedports, the address translation module 210 determines the addresses ofthe forwarded packets that do not need to be translated. If there arematching source ports and destination ports in the connection tablemodule 220 with those from the forwarded packets, and the matchingsource ports and destination ports have corresponding translated ports,the address translation module 210 determines that the addresses of theforwarded packets need to be translated. If there are no matching sourceports and destination ports in the connection table module 220 withthose from the forwarded packets, the address translation module 210further determines if the addresses of the forwarded packets need to betranslated according to source addresses and destination addressesthereof, and also stores corresponding data of the forwarded packets inthe connection table module 220. If one of the source addresses and thedestination addresses is the communication network 30, the addresses ofthe forwarded packets need to be translated, otherwise, the addresses ofthe forwarded packets do not need to be translated.

If the address translation module 210 determines the addresses of theforwarded packets do not need to be translated, the address translationmodule 210 sends the forwarded packets to the IP routing module 240.

The address translation module 210 is further configured for translatingthe addresses of the forwarded packets, marking the forwarded packets oftranslated addresses with flags, recording the flags in the controlbuffer module 230, and sending the forwarded packets including themarked packets and unmarked packets to the IP routing module 240 if theaddresses of the forwarded packets need to be translated. In oneembodiment, the address translation module 210 marks the forwardedpackets of translated addresses with a numeral “1.”

The control buffer module 230 is configured for recording flags. In oneembodiment, a flag is configured for indicating a packet of translatedaddresses, and may be represented by the numeral “1”. In alternativeembodiments, the flag may be represented by other numerals or letters.In one embodiment, the control buffer module 230 sets the datastructures to correspond to the forwarded packets, copies all the datafrom the forwarded packets to the data structures, and adds a field tothe data structures to record the flags. In one particular embodiment,the control buffer module 230 may be a control buffer (cb[48]) of asocket buffer (sk_buff) of the Linux operating system. In alternativeembodiments, the control buffer module 230 may be a control buffer of asocket buffer of other operating systems, such as Windows XP.

The IP routing module 240 is connected to the address translation module210 and the executing module 260, and is configured for determiningtypes of the forwarded packets from the address translation module 210,including the marked packets and the unmarked packets, and routing thedetermined types packets. The IP routing module 240 queries a routingtable therein to determine types of the forwarded packets from theaddress translation module 210. In one embodiment, the forwarded packetsfrom the address translation module 210 include the self packets, theinternal packets, and the forwarding packets.

If the IP routing module 240 determines the forwarded packets are selfpackets, the IP routing module 240 sends the self packets to theexecuting module 260. If the IP routing module 240 determines thepackets are not self packets, the IP routing module 240 sends theforwarded packets to the address translation module 210.

The executing module 260 is connected to the IP routing module 240 andis configured for receiving and processing the self packets from the IProuting module 240. The executing module 260 also sends other selfpackets, which are responses to the self packets to the IP routingmodule 240 to send to the address translation module 210.

The address translation module 210 is further configured for determiningif the addresses of the forwarded packets from the IP routing module 240need to be translated when receiving the forwarded packets from the IProuting module 240. If the address translation module 210 determinesthat the addresses of the forwarded packets from the IP routing module240 do not need to be translated (i.e., the forwarded packets from theIP routing module 240 are self packets or internal packets), the addresstranslation module 210 sends the forwarded packets from the IP routingmodule 240 to the transceiver module 200 to forward the forwardedpackets from the IP routing module 240 to a corresponding one of theuser terminal devices 10 and the communication network 30.

If the address translation module 210 determines the addresses of theforwarded packets from the IP routing module 240 need to be translated(i.e., the forwarded packets from the IP routing module 240 areforwarding packets), the address translation module 210 continues todetermine if the addresses of the forwarded packets from the IP routingmodule 240 have been translated. In one embodiment, the addresstranslation module 210 queries the flags in the control buffer module230 to determine if the addresses of the forwarded packets from the IProuting module 240 have been translated.

In one embodiment, the address translation module 210 is furtherconfigured for releasing the flags from the control buffer module 230and directly sending the forwarded packets from the IP routing module240 to the transceiver module 200 to forward to the communicationnetwork 30 or the user terminal devices 10, assuming the addresstranslation module 210 determines the addresses of the forwarded packetsfrom the IP routing module 240 have been translated.

If the addresses of the forwarded packets from the IP routing module 240have not been translated, the address translation module 210 translatesaddresses of the forwarded packets from the IP routing module 240 andsends the forwarded packets from the IP routing module 240 of translatedaddresses to the transceiver module 200 to forward to the communicationnetwork 30 or the user terminal devices 10. In one embodiment, theaddress translation module 210 does not need to mark the forwardedpackets from the IP routing module 240 of translated addresses at thistime. In one embodiment, the address translation module 210 includes afirst address translation sub-module and a second address translationsub-module for translating a source address and a destination address ofa forwarded packet, respectively. The address translation module 210queries the connection table module 220 for data matching with that ofthe forwarded packet to determine a type of the forwarded packet. This,in turn, determines if the source address and the destination address ofthe forwarded packet should be translated by the first addresstranslation sub-module and the second address translation sub-module oronly one of the source address and the destination address should betranslated. Next, the address translation module 210 processes theforwarded packet initially by the first address translation sub-module,then, by the second address translation sub-module. Finally, the networkcommunication device 20 forwards the forwarded packet.

For example, as shown in FIG. 2, the address translation module 210includes a destination address translation sub-module 211 and a sourceaddress translation sub-module 212 for translating a source address anda destination address of a forwarded packet, respectively. In oneembodiment, the destination address translation sub-module 211 receivesa forwarded packet from the transceiver module 200 and determines if adestination address of the forwarded packet should be translated. If thedestination address translation sub-module 211 determines thedestination address of the forwarded packet should be translated, thedestination address translation sub-module 211 translates thedestination address of the forwarded packet, marks the forwarded packetwith a flag, records the flag in the control buffer module 230, andsends the marked packet to the IP routing module 240. When the sourceaddress translation sub-module 212 receives the same packet, i.e. themarked packet, from the IP routing module 240, the source addresstranslation sub-module 212 searches the flag in the control buffermodule 230, determines the destination address of the marked packet hasbeen translated, and directly sends the forwarded packets to thetransceiver module 200.

If the destination address translation sub-module 211 determines thedestination address of the forwarded packet should not be translated,the destination address translation sub-module 211 sends the forwardedpackets to the IP routing module 240. When the source addresstranslation sub-module 212 receives the same packet, i.e. the forwardedpacket, from the IP routing module 240, the source address translationsub-module 212 determines a source address of the forwarded packetshould be translated, translates the source address of the forwardedpacket, and sends the forwarded packet of translated source address tothe transceiver module 200. In one embodiment, source addresses ofpackets from the user terminal devices 10 to the communication network30 and destination addresses of packets from the communication network30 to the user terminal devices 10 should be translated.

In the embodiment of FIG. 2, paths f1, f2, and f3 are three paths inwhich the network communication device 20 processes packets. If thenetwork communication device 20 receives a forwarding packet, thenetwork communication device 20 processes the forwarding packetaccording to the path f2. If the network communication device 20receives a self packet from the user terminal devices 10, the networkcommunication device 20 processes the self packet according to the pathf1. In other words, the self packet goes through the destination addresstranslation sub-module 211, the IP routing module 240, and the executingmodule 260. After the executing module 260 processes the self packet,the executing module 260 generates a response packet, and the networkcommunication device 20 processes the response packet according to thepath f3. Specifically, the response packet goes through the executingmodule 260, the IP routing module 240, and the source addresstranslation sub-module 212. The executing module 260 is in theapplication layer and the IP routing module 240 is in the network layer.

FIG. 3 is a flowchart of one embodiment of a packet routing methodemployed by the network communication device of the present disclosure.In one embodiment, the user terminal devices 10 communicate with thecommunication network 30 via the network communication device 20, andthe network communication device 20 forwards packets between one or moreof the user terminal devices 10, the network communication device 20,and the communication network 30. The packets include self packets,internal packets, and forwarding packets.

In block S300, the transceiver module 200 receives packets and sends thepackets to the address translation module 210 (hereinafter forwardedpackets). In block S302, the address translation module 200 receives theforwarded packets from the transceiver module 200 and determines ifaddresses of the forwarded packets need to be translated. In oneembodiment, the address translation module 210 queries the source ports,the destination ports, and the translated ports in the connection tablemodule 220 to determine if the addresses of the forwarded packets shouldbe translated. If there are matching source ports and destination portsin the connection table module 220 with those from the forwardedpackets, and the matching source ports and destination ports do not havecorresponding translated ports, the address translation module 210determines the addresses of the forwarded packets do not need to betranslated. If there are matching source ports and destination ports inthe connection table module 220 with those from the forwarded packets,and the matching source ports and destination ports have correspondingtranslated ports, the address translation module 210 determines theaddresses of the forwarded packets need to be translated. If there areno matching source ports and destination ports in the connection tablemodule 220 with those from the forwarded packets, the addresstranslation module 210 further determines if the addresses of theforwarded packets need to be translated according to source addressesand destination addresses thereof, and also stores corresponding datafrom the forwarded packets in the connection table module 220. If one ofthe source addresses and the destination addresses is the communicationnetwork 30, the addresses of the forwarded packets need to betranslated, otherwise, the addresses of the forwarded packets do notneed to be translated.

If the address translation module 210 determines the addresses of theforwarded packets need to be translated, in block S304, the addresstranslation module 210 translates the addresses of the forwardedpackets, marks the forwarded packets of translated addresses with flags,and records the flags in the control buffer module 230. Then, in blockS306, the address translation module 210 sends the forwarded packets,including the marked packets and unmarked packets, to the IP routingmodule 240. If the address translation module 210 determines theaddresses of the forwarded packets do not need to be translated, theprocess directly goes to block S306, wherein the address translationmodule 210 sends the forwarded packets to the IP routing module 240.

In block S308, the IP routing module 240 determines types of theforwarded packets from the address translation module 210. The IProuting module 240 queries a routing table therein to determine types ofthe forwarded packets from the address translation module 210. In oneembodiment, the forwarded packets from the address translation module210 include self packets, internal packets, and forwarding packets.

If the IP routing module 240 determines the forwarded packets are selfpackets, in block S312, the IP routing module 240 routs the self packetsto the executing module 260, and the executing module 260 processes theself packets from the IP routing module 240.

If the IP routing module 240 determines the forwarded packets areinternal packets or forwarding packets, in block S310, the IP routingmodule 240 routes the forwarded packets to the address translationmodule 210.

FIG. 4 is a flowchart of the packet routing method of the networkcommunication device 20 after block S310 of FIG. 3. In block S400, theaddress translation module 210 receives the forwarded packets from theIP routing module 240. In block S402, the address translation module 210determines if the addresses of the forwarded packets from the IP routingmodule 240 need to be translated. In one embodiment, the addresstranslation module 210 searches the source ports, the destination ports,and the translated ports in the connection table module 220 to determineif the addresses of the forwarded packets from the IP routing module 240should be translated.

If the address translation module 210 determines the addresses of theforwarded packets from the IP routing module 240 do not need to betranslated, in block S412, the address translation module 210 sends theforwarded packets from the IP routing module 240 to the transceivermodule 200 to forward the forwarded packets to corresponding userterminal devices 10.

If the address translation module 210 determines the addresses of theforwarded packets from the IP routing module 240 need to be translated,in block S404, the address translation module 210 determines if theaddresses of the forwarded packets from the IP routing module 240 havebeen translated. In one embodiment, the address translation module 210queries the flags in the control buffer module 230 to determine if theaddresses of the forwarded packets from the IP routing module 240 havebeen translated.

If the addresses of the forwarded packets from the IP routing module 240have been translated, in block S406, the address translation module 210releases the flags from the control buffer module 230. Then, in blockS410, the address translation module 210 sends the forwarded packetsfrom the IP routing module 240 to the transceiver module 200 to forwardthe forwarded packets.

If the addresses of the forwarded packets from the IP routing module 240have not been translated, in block S408, the address translation module210 translates the addresses of the forwarded packets from the IProuting module 240. In one embodiment, at this time, the addresstranslation module 210 does not need to mark the forwarded packets fromthe IP routing module 240 with translated addresses. Then, in blockS410, the address translation module 210 sends the forwarded packets tothe transceiver module 200 to forward the forwarded packets.

The network communication device 20 marks packets that have had theiraddresses translated by the address translation module 210, therebypreventing the address translation module 210 from translating eachpacket more than once when the packets repeatedly enter the addresstranslation module 210. This saves time spent on address translation andincreases the forwarding efficiency of the network communication device20.

The foregoing disclosure of various embodiments have been presented forpurposes of illustration and description. It is not intended to beexhaustive or to limit the invention to the precise forms disclosed.Many variations and modifications of the embodiments described hereinwill be apparent to one of ordinary skill in the art in light of theabove disclosure. The scope of the present disclosure is to be definedonly by the claims appended hereto and their equivalents.

1. A network communication device for forwarding packets between aplurality of user terminal devices and a communication network, thenetwork communication device comprising: a transceiver module configuredfor forwarding the packets between the plurality of user terminaldevices and the communication network; an address translation moduleconfigured for determining if addresses of the packets forwarded fromthe transceiver module need to be translated, translating the addressesof the packets forwarded from the transceiver module upon the conditionthat the addresses of the packets forwarded from the transceiver moduleneed to be translated, and marking the packets of translated addresseswith flags; a control buffer module configured for recording the flagsof the marked packets of translated addresses; an internet protocol (IP)routing module configured for routing the packets forwarded from thetransceiver module and sending the packets forwarded from thetransceiver module to the address translation module; and a processorthat executes the transceiver module, the address translation module,the control buffer module, and the IP routing module; wherein theaddress translation module determines if the addresses of the packetsforwarded from the transceiver module from the IP routing module havebeen translated by querying the flags in the control buffer module whenreceiving the packets forwarded from the transceiver module from the IProuting module, and directly sends the marked packets from the IProuting module to the transceiver module.
 2. The network communicationdevice of claim 1, wherein the packets comprise packets forwardedbetween the user terminal devices, packets forwarded between the userterminal devices and the network communication device, and packetsforwarded between the user terminal devices and the communicationnetwork.
 3. The network communication device of claim 1, furthercomprising a connection table module configured for recording data fromthe packets forwarded from the transceiver module, wherein the data fromthe packets forwarded from the transceiver module include sourceaddresses, destination addresses, source ports, destination ports,translated addresses, and translated ports of the packets forwarded fromthe transceiver module.
 4. The network communication device of claim 3,wherein the address translation module queries the source ports, thedestination ports, and the translated ports in the connection tablemodule to determine if the addresses of the packets forwarded from thetransceiver module need to be translated.
 5. The network communicationdevice of claim 4, wherein the address translation module determines theaddresses of the packets forwarded from the transceiver module do notneed to be translated upon the condition that there are matching sourceports and destination ports in the connection table module with thosefrom the packets forwarded from the transceiver module, and the matchingsource ports and destination ports do not have corresponding translatedports.
 6. The network communication device of claim 4, wherein theaddress translation module determines the addresses of the packetsforwarded from the transceiver module need to be translated upon thecondition that there are matching source ports and destination ports inthe connection table module with those from the packets forwarded fromthe transceiver module, and the matching source ports and destinationports have corresponding translated ports.
 7. The network communicationdevice of claim 4, wherein the address translation module furtherdetermines if the addresses of the packets forwarded from thetransceiver module need to be translated according to source addressesand destination addresses of the packets forwarded from the transceivermodule and stores corresponding data from the packets forwarded from thetransceiver module in the connection table module if there are nomatching source ports and destination ports in the connection tablemodule with those from the packets forwarded from the transceivermodule.
 8. The network communication device of claim 7, wherein if oneof the source addresses and the destination addresses is the network,the address translation module determines the addresses of the packetsforwarded from the transceiver module need to be translated.
 9. Thenetwork communication device of claim 1, wherein the address translationmodule is configured for directly sending the packets forwarded from thetransceiver module to the IP routing module if the address translationmodule determines the addresses of the packets forwarded from thetransceiver module do not need to be translated.
 10. The networkcommunication device of claim 1, wherein the address translation moduleis further configured for releasing the flags from the control buffermodule if the address translation module determines the addresses of thepackets forwarded from the IP routing module have been translated.
 11. Apacket routing method for utilization in a network communication devicefor forwarding packets between a plurality of user terminal devices anda communication network, comprising: receiving the packets forwardedfrom a transceiver module; determining if addresses of the packetsforwarded from the transceiver module need to be translated; translatingaddresses of the packets forwarded from the transceiver module, markingthe packets of translated addresses with flags, and recording the flagsin a control buffer module, if the addresses of the packets forwardedfrom the transceiver module need to be translated; sending the packetsforwarded from the transceiver module to an internet protocol (IP)routing module; sending the packets forwarded from the transceivermodule to an address translation module by the IP routing module;determining if the addresses of the packets forwarded from thetransceiver module from the IP routing module have been translated byquerying the flags in the control buffer module; and sending the packetsforwarded from the transceiver module from the IP routing module to thetransceiver module to forward the packets forwarded from the transceivermodule from the IP routing module upon the condition that the addressesof the packets forwarded from the transceiver module from the IP routingmodule have been translated.
 12. The packet routing method of claim 11,wherein the block of determining if addresses of the packets forwardedfrom the transceiver module need to be translated comprises: queryingsource ports, destination ports, and translated ports in a connectiontable module to determine if the addresses of the packets forwarded fromthe transceiver module need to be translated.
 13. The packet routingmethod of claim 12, wherein the block of determining if addresses of thepackets forwarded from the transceiver module need to be translatedcomprises: determining the addresses of the packets forwarded from thetransceiver module do not need to be translated if there are matchingsource ports and destination ports in the connection table module withthose from the packets forwarded from the transceiver module, and thematching source ports and destination ports do not have correspondingtranslated ports; and determining the addresses of the packets forwardedfrom the transceiver module need to be translated if there are matchingsource ports and destination ports in the connection table module withthose from the packets forwarded from the transceiver module, and thematching source ports and destination ports have correspondingtranslated ports.
 14. The packet routing method of claim 13, wherein theblock of determining if addresses of the packets forwarded from thetransceiver module need to be translated further comprises: determiningif the addresses of the packets forwarded from the transceiver moduleneed to be translated according to source addresses and destinationaddresses thereof if there are no matching source ports and destinationports in the connection table module with those from the packetsforwarded from the transceiver module; and storing corresponding datafrom the packets forwarded from the transceiver module in the connectiontable module.
 15. The packet routing method of claim 11, furthercomprising a block of determining if the addresses of the packetsforwarded from the transceiver module from the IP routing module need tobe translated before the block of determining if the addresses of thepackets forwarded from the transceiver module from the IP routing modulehave been translated.
 16. The packet routing method of claim 11, furthercomprising: translating the addresses of the packets forwarded from thetransceiver module from the IP routing module if the addresses of thepackets forwarded from the transceiver module from the IP routing modulehave not been translated.
 17. The packet routing method of claim 11,further comprising: releasing the flags from the control buffer module.18. A network communication device, for forwarding packets, comprising:a destination address translation sub-module, for translatingdestination addresses of the packets; and a source address translationsub-module, for translating source addresses of the packets; wherein thenetwork communication device receives a packet, determines a type of thepacket to determine if the source address and the destination address ofthe packet should be translated, processes the packet first by thedestination address translation sub-module, then by the source addresstranslation sub-module, and forwards the packet.